Segment Anything Segmentation 
Algorithm that segments a three layer image using Meta AI's Segment Anything Model (SAM 1). The model can segment and optionally classify objects based on a thematic layer (prompt box or points) or every object in an image. The algorithm supports up to 6144 x 6144 pixels, therefore for larger scenes create a smaller subset of the image using region, tiling, or work on a smaller map.
You can combine this algorithm with eCognitions Multiresolution Segmentation or other segmentation algorithms to optimize results.
The image size the model accepts and where it applies its prediction is 1024x1024 pixels. If a region is larger, internally a resizing is applied, leading to a loss of details and non-meaningful results. Therefore, it is recommended to divide the image into smaller areas, for example, by using a chessboard segmentation with a size of 1024 pixels, and then iterate the Segment Anything Segmentation to all these tiles. (Example: for all objects on 'Chessboard Level' create a map for each object, apply the 'Segment Anything Segmentation algorithm' on that map and synchronize created image objects back to the original map.)
Supported Domains
Pixel Level;
Input
Use image layer array
If set to Yes, an image layer array can be used instead of multiple layer selection.
Image layers
Select three input image layers. Note that this algorithm requires 3 channels.
Input mode
Select an input mode for the algorithm. Choose between:
-
everything - automatically segment everything in the image
-
bounding boxes - uses a polygon or line vector layer prompt
-
points - uses a point vector layer
Create the thematic layer using eCognitions Manual Editing Toolbar > Thematic editing > New Layer (Polygon) > Generate thematic objects > Save thematic layer > Close Manual Editing Toolbar. For point vector layers you can also use eCognition's algorithm vector buffering to create a polygon vector layer as input to the SAM algorithm.
Vector layer
Select a thematic layer (polygon or line format for bounding boxes or point format) that contains prompts for the segment anything model. The shape of the boxes must not comprise the full object, and shapes can overlap. Only available for selection of 'bounding boxes' or 'points' for parameter Input Mode.
Minimum object size (pxl)
Minimum object size in pixels to be generated by this algorithm. The actual minimum size is not guaranteed, but the algorithm makes its best attempt to achieve this value. Only available for selection of 'everything' for parameter Input Mode.
Region
Select a subset region of the image. Note that the SAM algorithm supports up to 6144x6144 pixels and uses internally a tile size of 1024x1024.
Segmentation Settings
Level name
Select an existing level to overwrite or enter a level name for the segmentation result. It is only possible to create or overwrite the level located directly above pixel level in the level hierarchy. Default name New Level.
Class
Option to select a class for the detected objects.
Normalization configuration
Input range
Decide if the image layers should be normalized and define the selected image layers input data range (see also Output range parameter below). Choose between:
-
Disabled (default)
-
[0 , 255]
-
[0 , 65535]
-
[-1 , 1]
-
11 bit data [0 , 2047]
-
Custom range - define a customized data range
Input range minimum
Insert the minimum value of the customized input data range. (This parameter is only available for Input range > Custom range)
Input range maximum
Insert the maximum value of the customized input data range. (This parameter is only available for Input range > Custom range)
Output range
Select a normalization output range as expected by the model (32 bit float data type):
-
[0 , 1]
-
[-1 , 1]